import request from "../common/axios";

/**
 * 手机查询下拉框选项
 * @param data
 * @returns {AxiosPromise}
 */
export function getMobileOption(data) {
    return request({
        url: '/d/con_control/info',
        method: 'get',
        params: data,
        headers: {'Content-Type': 'application/json'}
    });
}

/**
 * 获取手机数据
 * @param data
 * @returns {AxiosPromise}
 */
export function getMobileList(data) {
    return request({
        url: '/d/con_control/mobile',
        method: 'get',
        params: data,
        headers: {'Content-Type': 'application/json'}
    });
}

/**
 * 获取收测记录
 * @param data
 * @returns {AxiosPromise}
 */
export function getRedioTest(data) {
    return request({
        url: '/d/con_control/rediotest',
        method: 'get',
        params: data,
        headers: {'Content-Type': 'application/json'}
    });
}

/**
 * 添加手机
 * @param data
 * @returns {AxiosPromise}
 */
export function addMobile(data) {
    return request({
        url: '/d/con_control/mobile',
        method: 'post',
        data,
        headers: {'Content-Type': 'application/json'}
    });
}

/**
 * 删除手机
 * @param data
 * @returns {AxiosPromise}
 */
export function deleteMobile(data) {
    return request({
        url: '/d/con_control/mobile',
        method: 'delete',
        params: data,
        headers: {'Content-Type': 'application/json'}
    });
}


/**
 * 编辑手机
 * @param data
 * @returns {AxiosPromise}
 */
export function editMobel(data) {
    return request({
        url: '/d/con_control/mobile',
        method: 'patch',
        data,
        headers: {'Content-Type': 'application/json'}
    });
}

/**
 * 查询工作路径
 * @param data
 * @returns {AxiosPromise}
 */
export function getMobileWorkPath(data) {
    return request({
        url: '/d/con_control/wrokpath',
        method: 'post',
        data,
        headers: {'Content-Type': 'application/json'}
    });
}


/**
 * 获取频点数据
 * @param data
 * @returns {AxiosPromise}
 */
export function getFreqList(data) {
    return request({
        url: '/d/con_control/freqcategory',
        method: 'get',
        params: data,
        headers: {'Content-Type': 'application/json'}
    });
}


/**
 * 添加新频点分类
 * @param data
 * @returns {AxiosPromise}
 */
export function addFreqCategory(data) {
    return request({
        url: '/d/con_control/freqcategory',
        method: 'post',
        data,
        headers: {'Content-Type': 'application/json'}
    });
}

/**
 * 修改频点分类
 * @param data
 * @returns {AxiosPromise}
 */
export function editFreqCategory(data) {
    return request({
        url: '/d/con_control/freqcategory',
        method: 'patch',
        data,
        headers: {'Content-Type': 'application/json'}
    });
}

/**
 * 删除频点分类
 * @param data
 * @returns {AxiosPromise}
 */
export function deleteFreqCategory(data) {
    return request({
        url: '/d/con_control/freqcategory',
        method: 'delete',
        params: data,
        headers: {'Content-Type': 'application/json'}
    });
}


/**
 * 获取人员管理表格
 * @param data
 * @returns {AxiosPromise}
 */
export function getMonitorData(data) {
    return request({
        url: '/d/con_control/monitor',
        method: 'get',
        params: data,
        headers: {'Content-Type': 'application/json'}
    });
}


/**
 * 添加监测人员
 * @param data
 * @returns {AxiosPromise}
 */
export function addMonitor(data) {
    return request({
        url: '/d/con_control/monitor',
        method: 'post',
        data,
        headers: {'Content-Type': 'application/json'}
    });
}

/**
 * 修改监测人员
 * @param data
 * @returns {AxiosPromise}
 */
export function editMonitor(data) {
    return request({
        url: '/d/con_control/monitor',
        method: 'patch',
        data,
        headers: {'Content-Type': 'application/json'}
    });
}

/**
 * 删除监测人员
 * @param data
 * @returns {AxiosPromise}
 */
export function deleteMonitor(data) {
    return request({
        url: '/d/con_control/monitor',
        method: 'delete',
        params: data,
        headers: {'Content-Type': 'application/json'}
    });
}


/**
 * 获取使用记录
 * @param data
 * @returns {AxiosPromise}
 */
export function getUseRecord(data) {
    return request({
        url: '/d/con_control/userecord',
        method: 'get',
        params: data,
        headers: {'Content-Type': 'application/json'}
    });
}